﻿//创建房间
package com.victim.snake.graphics
{
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	import flash.text.TextFieldType;



	import com.victim.snake.user.User;
	import com.victim.snake.user.ProcessMsg;
	import fl.controls.Label;
	import flash.display.Graphics;
	import fl.controls.Button;
	import flash.text.TextField;
	import flash.utils.ByteArray;
	import flash.net.drm.VoucherAccessInfo;

	//游戏主界面
	public class ErrorSprite extends Sprite
	{

		var errorLable:Label = null;
		var closebtn:Button = null;
		


		public function ErrorSprite():void
		{

			var graphics:Graphics = this.graphics;
			graphics.beginFill(0xcccccc,1);
			graphics.drawRect(100,70,300,200);
			graphics.endFill();
			graphics.beginFill(0xffffff,1);
			graphics.drawRect(101,71,298,198);
			graphics.endFill();

			errorLable=new Label();
			errorLable.width=200;
			errorLable.text = "";
			errorLable.x = 110;
			errorLable.y = 78;
			this.addChildAt(errorLable,0);


			closebtn=new Button();
			closebtn.x = 124;
			closebtn.y = 202;
			closebtn.label = "关闭";
			closebtn.addEventListener(MouseEvent.CLICK,closeWin);
			this.addChildAt(closebtn,1);
			
			
			

		}	
	
		
		//设置要显示的错误信息
		public function setErrorString(errorStr:String):void{
			this.errorLable.text=errorStr;
		}

		//关闭提示窗口
		public function closeWin(event:MouseEvent):void
		{
			this.visible=false;

		}
		
		

	}

}